Skip to content

feat(loop): dependency-aware census selection via the blocking graph - #135

Merged
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-97-census-blocking-graph
Jul 16, 2026
Merged

feat(loop): dependency-aware census selection via the blocking graph#135
robercano-ghbot merged 1 commit into
mainfrom
feat/issue-97-census-blocking-graph

Conversation

@robercano-ghbot

Copy link
Copy Markdown
Collaborator

Closes #97

What

loop-census.sh's ADVANCE selector now consults the blocking graph the cockpit already parses, instead of blindly picking the lowest-numbered planned + module:* issue with no branch.

For each otherwise-eligible candidate the census shells out to the existing cockpit.sh --parse-blocking seam (one parser, never reimplemented) to extract its Blocked by #N edges, and skips the candidate while any of those blockers is still OPEN (openness checked against one bulk gh issue list --state open fetch). It emits a blocked=<n> by=<m> line so tick/cockpit output shows why a candidate was passed over, then continues to the next unblocked lowest-numbered candidate.

Behavior (acceptance criteria)

  • An issue with an open Blocked by #N blocker is never selected for ADVANCE; the skip + reason appear in census output (blocked=<n> by=<m>).
  • When the blocker closes, the blocked issue becomes eligible automatically on the next tick (census re-runs; no bookkeeping).
  • A Blocked by cycle (A↔B) does not wedge the loop: when the gate leaves no unblocked candidate, it logs a fallback warning to stderr and falls back to the lowest-numbered otherwise-eligible candidate. With zero eligible candidates, advance_ready stays none as before.
  • Gating is on explicit Blocked by edges ONLY — task-list/parent-child - [ ] #N refs do NOT gate (trackers stay in backlog).

Scope

  • Optional "Discovered from #N" hygiene extension (issue item 4) intentionally out of scope.

Tests & docs

  • loop-census.test.sh: fixtures + cases for open-blocker skip, blocker-closed-becomes-eligible, cycle fallback, and task-list-does-not-gate.
  • docs/USAGE.md backlog-hygiene section documents that Blocked by #N is now load-bearing for loop selection, not just cosmetic.

Gates

build / lint / test all green (independently re-run by the orchestrator; smoke-fanout included). Reviewed under correctness + tests lenses, consensus=all.

loop-census.sh's ADVANCE selection now skips a planned candidate while any
issue it declares "Blocked by" (via cockpit.sh's existing --parse-blocking
parser, reused not reimplemented) is still open, emitting a
`blocked=<n> by=<N>` census line and picking the next unblocked
lowest-numbered candidate instead. Since census re-runs every tick, a
blocker closing makes the skipped issue eligible again for free. A
"Blocked by" cycle falls back to the lowest-numbered candidate (logged to
stderr) instead of wedging the loop. Task-list/parent-child refs
(`- [ ] #N`) intentionally do not gate — only the explicit phrase does.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@robercano-ghbot
robercano-ghbot merged commit 7f1d381 into main Jul 16, 2026
9 checks passed
@robercano-ghbot
robercano-ghbot deleted the feat/issue-97-census-blocking-graph branch July 16, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Loop: dependency-aware issue selection — census must consult the blocking graph it already parses

2 participants